/**
 * Copyright (c) 2018-present, Chen Guodong
 * All rights reserved.
 *
 * @flow
 */


<template>
  <div>
    <el-select
      v-model="selected"
      @change="selectChange"
      placeholder="请选择"
      popper-class="map-el-select"
    >
      <el-option v-for="j in data.values" :key="j.value" :label="j.label" :value="j.value"></el-option>
    </el-select>
  </div>
</template>

<script>
export default {
  props:{
    data: Object,
    defaultData: [String, Number, Object, Array]
  },
  data() {
    return {
      selected: this.defaultData,
    };
  },
  watch:{
   
  },
  methods:{
    selectChange(data){
      const self = this;
      let assignObj = {};
      assignObj[self.data.key] = data;
      this.$parent.pageTypes = Object.assign({}, this.$parent.pageTypes, assignObj);
    }
  },
  mounted(){
  },
  components: {}
};
</script>

<style lang='less' scoped>
</style>
